package com.caocaog.market.service.impl;

import com.caocaog.market.entity.OrderPay;
import com.caocaog.market.mapper.OrderPayMapper;
import com.caocaog.market.service.IOrderPayService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 商品订单支付信息表
 *
 * @author jeecg-boot
 * @date 2021-11-29
 */
@Service
@Transactional
@RequiredArgsConstructor
public class OrderPayServiceImpl extends ServiceImpl<OrderPayMapper, OrderPay> implements IOrderPayService {

    @Override
    public void savePayEndInfo(String payInfoId, String paramsStr) {
        OrderPay payInfo = this.baseMapper.selectById(payInfoId);
        payInfo.setEndPayInfo(paramsStr);
        payInfo.setPayStatus(1);
        this.baseMapper.updateById(payInfo);
    }

}
